<div class="uk-layui-form">
    <form class="layui-form uk-form" action="/admin/callcenter/extention/assigned.html" data-toggle="ajax-form" data-inner="#callCenterContent">
    	<input type="hidden" name="hostid" value="${hostid!''}">

        <div class="layui-form-item">
            <label class="layui-form-label">租户：</label>
            <div class="layui-input-inline" >
                <select name="orgi" id="extentionOrgi">
                    <option value="">请选择租户ID</option>
                    <#if tenantList??>
                    <#list tenantList as tenant>
                    <option value="${tenant.tenantcode!''}" <#if extention?? && extention.orgi == tenant.tenantcode>selected="selected"</#if>>${tenant.tenantcode!''}</option>
                    </#list>
                    </#if>
                </select>
            </div>
        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label" >绑定的分机号码：</label>

            <div class="layui-input-inline" style="width: 400px;">
                <select name = "ids" id="numberPool" multiple="multiple" style="width:100%;" lay-filter="numberPool">
                    <#if extentionList?? && extentionList?size gt 0>
                    <option value="" >请选择要分配给租户的分机号码</option>
                    <#list extentionList as number>
                    <option value="${number.id!''}" >${number.extention!''}</option>
                    </#list>
                    </#if>
                    </select>
            </div>

        </div>

        <div class="layui-form-button">
            <div class="layui-button-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="multiSelect.js"></script>
<script>
	layui.use('form', function(){
	  var form = layui.form;
	  form.render();
	});

    var multiSelect;
    layui.use(['multiSelect'], function() {
        multiSelect = layui.multiSelect;
        multiSelect.render('select', 'numberPool');
    });
</script>